package b;

import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

import static MyUtils.MHUtils.*;
import static MyUtils.MHMoban.*;


public class 亲7树 {
    @Test
    public void test() {
        qin7();
    }

    List<Integer> res = new ArrayList<>();
    int[] nums={1, 1, 2};
    int[] vis=new int[nums.length];
    void qin7(){
        int wei=0,zhi=0;
        bT(wei,zhi);
        System.out.println(res);
    }
    void bT(int wei, int zhi) {
        if(wei==3){
            if(zhi%7==0)res.add(zhi);
            return;
        }
        for (int i = 0; i < nums.length; i++) {
            if(vis[i]==1)continue;
            vis[i]=1; bT(wei+1,zhi*10+nums[i]); vis[i]=0;
        }
    }
}
